package plp.funcoo.expressions;

import plp.funcoo.environment.compilation.CompilationEnvironment;
import plp.funcoo.environment.execution.ExecutionEnvironment;
import plp.funcoo.exceptions.ClassNotDeclared;
import plp.funcoo.exceptions.MethodAlreadDeclared;
import plp.funcoo.exceptions.MethodNotDeclared;
import plp.funcoo.exceptions.VarAlreadyDeclared;
import plp.funcoo.exceptions.VarNotDeclared;

public class ExpNotEquals extends TestingExpression {

	public ExpNotEquals(Expression left, Expression right, String operator) {
		super(left, right, operator);
	}
	
	public ExpNotEquals(Expression left, Expression right) {
		super(left, right, "!=");
	}

	@Override
	public ExecutionEnvironment evaluate(ExecutionEnvironment envi) throws VarNotDeclared, MethodNotDeclared, VarAlreadyDeclared, MethodAlreadDeclared {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected boolean checkTypeTerminal(CompilationEnvironment envi)
			throws VarNotDeclared, ClassNotDeclared {
	
		return getLeft().getType(envi) == getRight().getType(envi);
	}
	public Expression makeCopy() {
		return new ExpNotEquals(this.getLeft().makeCopy(), this.getRight().makeCopy());
	}


}
